

#include "CSceneNodeAnimatorDelete.h"
#include "ISceneManager.h"

namespace irr
{
    namespace scene
    {


        //! constructor
        CSceneNodeAnimatorDelete::CSceneNodeAnimatorDelete(ISceneManager* manager, u32 time)
            : DeleteTime(time), SceneManager(manager)
        {
#ifdef _DEBUG
            setDebugName("CSceneNodeAnimatorDelete");
#endif
        }



        //! destructor
        CSceneNodeAnimatorDelete::~CSceneNodeAnimatorDelete()
        {
        }



        //! animates a scene node
        void CSceneNodeAnimatorDelete::animateNode(ISceneNode* node, u32 timeMs)
        {
            if (timeMs > DeleteTime && node && SceneManager)
                SceneManager->addToDeletionQueue(node);
        }



    } // end namespace scene
} // end namespace irr
